package sui.utils.excel;

import org.apache.poi.ss.usermodel.Cell;

public class ReaderExcelUtils {

	/**
	 * <p>
	 * Desc: 获取String类型的Cell值
	 * <p>
	 * @author XQF SUI
	 * @created 2017年4月21日 下午2:06:38
	 * @param cell
	 * @return
	 */
	public static String getStringCellValue(Cell cell) {
		String strCell = null;
		
		if (cell == null) {
			return strCell;
		}
		
		switch (cell.getCellTypeEnum()) {
		case STRING:
			strCell = cell.getStringCellValue();
			break;
		case NUMERIC:
			strCell = String.valueOf(cell.getNumericCellValue());
			break;
		case BOOLEAN:
			strCell = String.valueOf(cell.getBooleanCellValue());
			break;
		case BLANK:
			break;
		default:
			break;
		}
		
		return strCell;
	}
}
